﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ComparativoListForm.aspx.cs" 
Inherits="UILGestion.ObraAdmin.Comparativos.ComparativoListForm" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="lib" %>
<%@ Register src="../../Control/menuObraCtrl.ascx" tagname="menuObraCtrl" tagprefix="uc1" %>
<%@ Register src="../../Control/ComparativoListGrid.ascx" tagname="ComparativoListGrid" tagprefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    <link href="../../resources/css/main.css" rel="stylesheet" type="text/css" />
     <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/fonts.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/global.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/theme.css" />

    </head>
<body >
   <form id="form1" runat="server">
    
    <asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server"
         EnablePartialRendering="true"
          EnableScriptGlobalization="true">
    </asp:ToolkitScriptManager>
    <uc1:menuObraCtrl ID="menuObraCtrl1" runat="server" />

 <asp:Panel ID="pnlMain" runat="server" Visible="false"
  CssClass="Heading secTitle AreaHeading ms-crm-List-Header">
  <asp:Label ID="Label1" runat="server" Text="LISTA DE COMPARATIVOS" style="font-size: large; color: #960818"></asp:Label>
 </asp:Panel>
  
  <asp:Panel ID="Panel2" runat="server"   BackColor="white"  >

    
   <asp:Panel ID="PanelButtom" runat="server"   BackColor="white" Visible="false"
                GroupingText="Filtros de busqueda">

              <table cellspacing="1" >
              <tr>
                      <td align="right" width="150px">
                          Codigo:</td>
                      <td width="150px">
                          <lib:Input ID="codigoTXT" runat="server"  AutoPostBack="true" ></lib:Input>
                      </td>
                      <td width="80px" align="right">
                          Descripcion:</td>
                      <td colspan="3">
                          <lib:Input ID="descripcionTXT" runat="server" AutoPostBack="true" 
                              Width="200px" TabIndex="1"></lib:Input>
                      </td>
                      <td align="right" width="80px">
                          <asp:Button ID="BuscarBtn" runat="server" CssClass="ms-crm-List-Header" 
                              onclick="Button_Click" TabIndex="7" Text="Buscar" Width="120px" />
                      </td>
                      <td align="right">
                          &nbsp;</td>
                  </tr>
          <tr>
          <td align="right"  width="150px">
                 Proveedor:</td>
                <td  colspan="5" width="450px"> 
                    <lib:Input ID="proveedortxt" runat="server" Width="420px" DataType="List" AutoPostBack="true"  
                        Method="GetProveedor" TabIndex="3"></lib:Input>
                </td>
             <td>
                 <asp:Button ID="nuevoButton" runat="server" CssClass="ms-crm-List-Header" 
                     onclick="Button_Click" TabIndex="8" Text="Nuevo" Width="120px" />
              </td>
              <td>
                  &nbsp;</td>
 </tr>
                  
                  <tr>
                      <td align="right" width="150px" >
                          Estado:</td>
                      <td colspan="3">
                          <cc1:DropDownCC ID="estadoDDL" runat="server" DataTextField="descripcion"  AutoPostBack="true"
                              DataValueField="idInternal" Width="150px" TabIndex="4">
                          </cc1:DropDownCC>
                      </td>
                      <td align="right" width="80px" >
                          &nbsp;</td>
                      <td width="140px" >
                          &nbsp;</td>
                      <td align="right" width="80px" >
                          <asp:Button ID="ExportarButton" runat="server" CssClass="ms-crm-List-Header" 
                              onclick="Button_Click" TabIndex="10" Text="Exportar Todo a Excel" 
                              Width="120px" />
                      </td>
                      <td>
                          &nbsp;</td>
                  </tr>
                  <tr>
                      <td align="right" width="150px" >
                          Fecha Inicio:</td>
                      <td >
                          <cc1:PostTextBox ID="inicioDateTime" runat="server" Width="85px" TabIndex="5"></cc1:PostTextBox>
                          <asp:ImageButton ID="ImageButton2" runat="Server" 
                              AlternateText="Click aqui para mostrar calendario" 
                              ImageUrl="../../Images/month.gif" Width="16px" />
                          <asp:CalendarExtender ID="CalendarExtender1" runat="server" 
                              PopupButtonID="ImageButton2" TargetControlID="inicioDateTime">
                          </asp:CalendarExtender>
                      </td>
                      <td align="right"  width="80px">
                          Fecha Fin:
                      </td>
                      <td  width="140px">
                          <cc1:PostTextBox ID="finDateTime" runat="server" Width="85px" TabIndex="6"></cc1:PostTextBox>
                          <asp:ImageButton ID="ImageButton1" runat="Server" 
                              AlternateText="Click aqui para mostrar calendario" 
                              ImageUrl="../../Images/month.gif" Width="16px" />
                          <asp:CalendarExtender ID="CalendarExtender2" runat="server" 
                              PopupButtonID="ImageButton1" TargetControlID="finDateTime">
                          </asp:CalendarExtender>
                      </td>
                      <td align="right"  width="80px">
                          &nbsp;</td>
                      <td  colspan="2">
                          &nbsp;</td>
                      <td >
                      </td>
                  </tr>
                  <tr class="ms-crm-Form-Body" >
                      <td align="right" width="150px">
                          &nbsp;</td>
                      <td>
                          &nbsp;</td>
                      <td align="right" width="80px">
                          &nbsp;</td>
                      <td>
                          &nbsp;</td>
                      <td align="right">
                          &nbsp;</td>
                      <td align="right">
                          &nbsp;</td>
                      <td width="100px">
                          &nbsp;</td>
                      <td width="100px">
                          &nbsp;</td>
                  </tr>
 </table>
 </asp:Panel>
 
                       
  </asp:Panel>
                  <asp:Panel ID="PanelBody" runat="server"  BackColor="white" Visible="false" >
   
     <input id="idObra" type="hidden" runat="server" name="idObra"  />


     <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
     <ContentTemplate>


  <uc2:ComparativoListGrid ID="ComparativoListGrid1"  DataSourceID="comparativoListODS"  
    runat="server" />


            <asp:ObjectDataSource ID="comparativoListODS"  runat="server"
             EnablePaging="True"
              SelectCountMethod="Count" 
              SortParameterName="sortExpression"
             SelectMethod="getComparativoFiltroList" 
             typeName="BOL.ComparativoBL" >
               <SelectParameters>
                <asp:querystringparameter  Name="idObra" Type="Int32" querystringfield="idObra"  />
                <asp:ControlParameter Name="codigoStr" Type="String" ControlID="codigoTXT"   />
                <asp:ControlParameter Name="descripcionStr" Type="String" ControlID="descripcionTXT"   />
                <asp:ControlParameter Name="estadoStr" Type="String" ControlID="estadoDDL"   />
                <asp:ControlParameter Name="proveedorStr" Type="String" ControlID="proveedortxt"  />
                <asp:ControlParameter Name="fechaInicio" Type="DateTime" ControlID="inicioDateTime"  />
                <asp:ControlParameter Name="fechaFin" Type="DateTime" ControlID="finDateTime"  />
                <asp:Parameter Name="startRowIndex" Type="Int32" />
                <asp:Parameter Name="maximumRows" Type="Int32" />
                <asp:Parameter Name="sortExpression" Type="String" />

                </SelectParameters>
               </asp:ObjectDataSource>
       
       </ContentTemplate>
       <Triggers>
       <asp:AsyncPostBackTrigger ControlID="BuscarBtn" /> 
           </Triggers>
       
     </asp:UpdatePanel>
       </asp:Panel>
    </form>

</body>
</html>
